<?php

class QuemsomosController extends Site_Controller_Action
{
    
    public function init()
    {
        
    } 

    public function indexAction()
    {
        Zend_Loader::loadClass('dominio','library');
        
        $this->view->headScript()->appendFile($this->_urlbase.'/public/media/js/jquery.elevateZoom-3.0.7.min.js');
        
        $row = $this->db->fetchRow('SELECT SQL_CACHE * FROM PAGINASSITE WHERE PAG_MODULO = "'.$this->_controller.'" and CTS_ID = '.$this->_segmento->CTS_ID);
        $this->view->result = $row;
        
        try {
            $query = 'SELECT SQL_CACHE * FROM GALERIA WHERE GAL_TPO = '.dominio::getGaleria('quemsomos').' and GAL_KEY = '.$row['PAG_ID'].' ORDER BY GAL_ORD ASC';
            $this->view->gal = $this->db->fetchAll($query);
        } catch (Exception $exc) {
            $this->view->gal = array();
            //echo $exc->getTraceAsString();
        }
        
        $this->view->dir = dominio::getdirGaleria('quemsomos'); 
    }


}

